module(
    name = "rules_gzip",
    version = "1.0.0-beta.1",
    bazel_compatibility = [
        ">=7.0.0",
    ],
    compatibility_level = 1,
)

bazel_dep(name = "toolchain_utils", version = "1.0.0-beta.9")
bazel_dep(name = "rules_coreutils", version = "1.0.0-beta.1")
bazel_dep(name = "ape", version = "1.0.0-beta.7")

export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain_export")
use_repo(export, "ape-pigz")
export.symlink(
    name = "pigz",
    target = "@ape-pigz",
)
use_repo(export, "pigz")

resolved = use_repo_rule("@toolchain_utils//toolchain/resolved:defs.bzl", "toolchain_resolved")

resolved(
    name = "resolved-pigz",
    toolchain_type = "//gzip/toolchain/pigz:type",
)

register_toolchains("//gzip/toolchain/...")
